<template>
  <div class="project-attachments">
    <h2>项目状态&进度</h2>
    <div class="body">
      <p>项目状态:</p>
      <div class="text">
        <el-tag :type="attachment.type">
          {{ attachment.data }}
        </el-tag>
      </div>
      <p>项目进度:</p>
      <el-timeline style="max-width: 600px" class="timeline">
        <el-timeline-item
          v-for="(item, index) in schedule"
          :key="index"
          :timestamp="'步骤' + (index + 1)"
          placement="top"
          :type="attachment.type"
        >
          <el-card>
            <h4>{{ item.stateName }}</h4>
            <el-tag :type="item.state">{{ item.stateData }}</el-tag>
          </el-card>
        </el-timeline-item>
      </el-timeline>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue'

const attachment = ref({
  data: '省厅审核项目通过',
  type: 'success'
})

const schedule = ref([
  {
    state: 'success',
    stateName: '申报',
    stateData: '已完成'
  },
  {
    state: 'success',
    stateName: '高校管理员审核',
    stateData: '已完成'
  },
  {
    state: 'success',
    stateName: '省厅专家组审核',
    stateData: '已完成'
  },
  {
    state: 'success',
    stateName: '省厅管理员审核',
    stateData: '已完成'
  }
])
</script>

<style lang="less" scoped>
.project-attachments {
  h2 {
    color: #5d78ff;
    margin-bottom: 30px;
  }
  h4 {
    margin-bottom: 10px;
  }
  .body {
    width: 96%;
    p {
      color: #5d78ff;
      margin-bottom: 20px;
    }
    .text {
      padding: 10px 20px;
      margin-top: 10px;
      cursor: text;
      border: 1px solid #eeeeee;
      border-radius: 5px;
      width: 100%;
      background-color: #ffffff;
      font-size: 14px;
      color: #707276;
      margin-bottom: 30px;
    }
    .timeline {
      padding-left: 20px;
      // background-color: pink;
    }
  }
}
</style>
